﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using GBlog.Core;
using Autofac;
using Autofac.Integration.Web.Mvc;

namespace GBlog
{
    public class MvcApplication : GApplication
    {
        protected override void Application_Start()
        {
            RegisterController(typeof(MvcApplication));
            base.Application_Start();
            ControllerBuilder.Current.SetControllerFactory(new AutofacControllerFactory(ContainerProvider));
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            AreaRegistration.RegisterAllAreas();
        }
    }
}